home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / bibtoref.bst (.txt) < prev    next >
LaTeX Document  |  1992-07-19  |  6KB  |  166 lines

  1. %%% ====================================================================
  2. %%%  @BibTeX-style-file{
  3. %%%     author          = "Ciaran McHale",
  4. %%%     version         = "1.00",
  5. %%%     date            = "21 July 1992",
  6. %%%     time            = "12:34:24 MDT",
  7. %%%     filename        = "bibtoref.bst",
  8. %%%     address         = "Department of Computer Science,
  9. %%%                        Trinity College,
  10. %%%                        Dublin 2,
  11. %%%                        Ireland",
  12. %%%     telephone       = "+353-1-772941 ext 1538",
  13. %%%     FAX             = "+353-1-772204",
  14. %%%     telex           = "93782 TCD EI",
  15. %%%     checksum        = "04276 201 698 5689",
  16. %%%     email           = "cjmchale@cs.tcd.ie or
  17. %%%                        cjmchale%cs.tcd.ie@cunyvm.cuny.edu"
  18. %%%     codetable       = "ISO/ASCII",
  19. %%%     keywords        = "",
  20. %%%     supported       = "no",
  21. %%%     docstring       = "This BibTeX style file translates selected
  22. %%%                        BibTeX bibliographies entries into UNIX
  23. %%%                        refer format.  It is based on a bib style
  24. %%%                        file by Kannan Varadhan.
  25. %%%                        To use it, create a temporary LaTeX file
  26. %%%                        that contains the \cite{...} entries you
  27. %%%                        want to convert, or else use \nocite{*} to
  28. %%%                        convert all of them.  Such a file might
  29. %%%                        look like this:
  30. %%%                        \documentstyle{article}
  31. %%%                        \begin{document}
  32. %%%                        \bibliographystyle{bibtoref}
  33. %%%                        \nocite{*} % or \cite{...,...,...}
  34. %%%                        \bibliography{BIBFILENAME}
  35. %%%                        \end{document}
  36. %%%                        Run latex then bibtex on the sample file;
  37. %%%                        the UNIX refer bibliography will appear in
  38. %%%                        the corresponding .bbl file.
  39. %%%                        The checksum field above contains a CRC-16
  40. %%%                        checksum as the first value, followed by the
  41. %%%                        equivalent of the standard UNIX wc (word
  42. %%%                        count) utility output of lines, words, and
  43. %%%                        characters.  This is produced by Robert
  44. %%%                        Solovay's checksum utility.",
  45. %%%  }
  46. %%% ====================================================================
  47. ENTRY
  48.   {                                     % entry fields
  49.         abstract                % non standard
  50.     address
  51.         annote                  % non standard
  52.     author
  53.     booktitle
  54.     chapter
  55.     edition
  56.     editor
  57.     howpublished
  58.     institution
  59.     journal
  60.     key
  61.         keywords                % non standard
  62.     month
  63.     note
  64.     number
  65.     organization
  66.     pages
  67.     publisher
  68.     school
  69.     series
  70.     title
  71.     type
  72.     volume
  73.     year
  74.   {}                                    % no integer entry variables
  75.   { label extra.label sort.label }      % label entry variables
  76. STRINGS { s t a.name }
  77. FUNCTION {not}
  78. {   { #0 }
  79.     { #1 }
  80.   if$
  81. FUNCTION {and}
  82. {   'skip$
  83.     { pop$ #0 }
  84.   if$
  85. FUNCTION {or}
  86. {   { pop$ #1 }
  87.     'skip$
  88.   if$
  89. INTEGERS { nameptr namesleft numnames }
  90. FUNCTION {handle.names}
  91. { 't :=         % type e.g. "A" for authors, "E" for editors
  92.   's :=         % the string containing the names
  93.   #1 'nameptr :=
  94.   s num.names$ 'numnames :=
  95.   numnames 'namesleft :=
  96.     { namesleft #0 > }
  97.     { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 'a.name :=
  98.       a.name "others" =
  99.         'skip$  % don't print out "%A others"
  100.         { "%" t * " " * a.name * write$ newline$ }
  101.       if$
  102.       nameptr #1 + 'nameptr :=
  103.       namesleft #1 - 'namesleft :=
  104.     }
  105.   while$
  106. FUNCTION {handle.maybe.empty}
  107.   't :=
  108.   duplicate$
  109.   empty$
  110.     'pop$
  111.     { "%" t * " " * swap$ * write$ newline$ }
  112.   if$
  113. FUNCTION {translate}
  114.   newline$      % get a blank line between each entry
  115.   title "T" handle.maybe.empty
  116.   booktitle "B" handle.maybe.empty
  117.   % there may be multiple authors so handle it differently
  118.   author empty$
  119.     { " empty author in " cite$ * warning$ }
  120.     { author "A" handle.names }
  121.   if$
  122.   editor "E" handle.maybe.empty
  123.   journal "J" handle.maybe.empty
  124.   keywords "K" handle.maybe.empty
  125.   cite$ "L" handle.maybe.empty
  126.   volume "V" handle.maybe.empty
  127.   abstract "X" handle.maybe.empty
  128.   % The date, if present may be just the year or both the month and year
  129.   % or might even be just the month
  130.   month empty$ year empty$ and
  131.     'skip$      % no date of publication so nothing to do
  132.     {
  133.       month empty$      % I'm using the if statement because I'm not
  134.         { "" }          % sure that--- month " " year * --- would work.
  135.         { month " " * } % (The manual doesn't mention anything about
  136.       if$               % this so I'm playing safe)
  137.       year empty$
  138.         { "" }
  139.         { year }
  140.       if$
  141.       *
  142.       "D" handle.maybe.empty
  143.     }
  144.   if$
  145.   pages "P" handle.maybe.empty
  146.   note "O" handle.maybe.empty
  147.   number "N" handle.maybe.empty
  148.   series "S" handle.maybe.empty
  149.   annote "Y" handle.maybe.empty
  150.   address "C" handle.maybe.empty
  151. FUNCTION {article} { translate }
  152. FUNCTION {book} { translate }
  153. FUNCTION {booklet} { translate }
  154. FUNCTION {inbook} { translate }
  155. FUNCTION {incollection} { translate }
  156. FUNCTION {inproceedings} { translate }
  157. FUNCTION {manual} { translate }
  158. FUNCTION {mastersthesis} { translate }
  159. FUNCTION {misc} { translate }
  160. FUNCTION {phdthesis} { translate }
  161. FUNCTION {proceedings} { translate }
  162. FUNCTION {techreport} { translate }
  163. FUNCTION {unpublished} { translate }
  164. FUNCTION {default.type} { translate }
  165. ITERATE {call.type$}
  166.